/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, {Component} from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    View,
    ScrollView,
    Easing,
    FlatList,
    Alert
} from 'react-native';
// import {Button} from "antd-mobile-rn";
import ActionSheet from 'react-native-actionsheet'
import ImagePicker from 'react-native-image-picker';
import Permissions from 'react-native-permissions'
import Dialog, { DialogFooter, DialogButton, DialogContent } from 'react-native-popup-dialog';


type Props = {};
export default class PopView extends Component<Props> {

    constructor(props) {
        super(props);

        this.state = {
            visible: false
        }
    }

    componentDidMount() {

    }

    render() {
        return (
            <View style={styles.container}>
                <Dialog
                    visible={this.state.visible}
                >
                    <DialogContent style={{width:220, height:220}}>
                       <View>
                           <FlatList

                               contentContainerStyle={{width:'100%', height:200,}}
                               ListHeaderComponent={()=>{
                                   return(
                                       <View style={{height:40, alignItems:'center',justifyContent: 'center'}}>
                                           <Text>标题</Text>
                                           <View style={{flexDirection:'row', alignItems:'center', }}>
                                               <Text style={{flex:1,textAlign: 'center'}}>1</Text>
                                               <Text style={{flex:1,textAlign: 'center'}}>2</Text>
                                               <Text style={{flex:1,textAlign: 'center'}}>3</Text>
                                           </View>
                                       </View>
                                   );
                               }}
                               data={[{title:'1231'},{title:'31'},{title:'fkskf'},{title:'fkskf'}]}
                               renderItem={({item})=>{
                                   return(
                                       <View style={{height:44, alignItems:'center',justifyContent: 'center'}}>
                                           <View style={{flexDirection:'row', alignItems:'center', }}>
                                               <Text style={{flex:1,textAlign: 'center'}}>{item.title}1</Text>
                                               <Text style={{flex:1,textAlign: 'center'}}>{item.title}2</Text>
                                               <Text style={{flex:1,textAlign: 'center'}}>{item.title}3</Text>
                                           </View>
                                       </View>
                                   );
                               }}
                            />
                       </View>
                    </DialogContent>
                </Dialog>
                {/*<Button*/}
                    {/*style={{width: 50, height: 50}}*/}
                    {/*onPressOut={() => {*/}
                        {/*this.setState((pre)=>{*/}
                            {/*return {visible:!pre.visible};*/}
                        {/*})*/}
                    {/*}}/>*/}
            </View>
        );
    }

}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    }
});

